﻿Ext.define('Rubros', {
    extend: 'ABMBase',
    Title: 'Formulario ABM Rubro',
    Model: 'Model.Rubro',
    defaultPropertySort: 'descripcion',
    listeners: {
        Creando: function (rcd) {
            rcd.record.set('id_rubro', activeInstance.GetNum('RUBROS'));
        }
    },
    WindowPanel: [{
        xtype: 'textfield',
        fieldLabel: 'Identificador',
        name: 'id_rubro',
        maxLength: 10,
        isPrimaryKey: true,
        enforceMaxLength: true,
        allowBlank: false
    }, {
        xtype: 'textfield',
        fieldLabel: 'Descripción',
        name: 'descripcion',
        maxLength: 50,
        enforceMaxLength: true,
        allowBlank: false
    }],
    Columns: [
            { text: 'Identificador', dataIndex: 'id_rubro', filter: true },
            { text: 'Descripcion', dataIndex: 'descripcion', filter: true }
        ]
});
